package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;

/**
 * @author lyl
 * description:跟帖实体bean
 */
public class SubContentBean {

    /**
     * 回帖id
     */
    private int subContentId;

    /**
     * 回帖标题
     */
    private String scTitle;

    /**
     * 回帖内容
     */
    private String scContent;

    /**
     * 回帖时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime subDateTime = LocalDateTime.now();

    /**
     * 回帖所属用户
     */
    private UserBean userBean;

    /**
     * 回帖所属主贴
     */
    private MainContentBean mainContentBean;

    public SubContentBean() {
    }

    public SubContentBean(String scTitle, String scContent) {
        this.scTitle = scTitle;
        this.scContent = scContent;
    }

    public int getSubContentId() {
        return subContentId;
    }

    public void setSubContentId(int subContentId) {
        this.subContentId = subContentId;
    }

    public String getScTitle() {
        return scTitle;
    }

    public void setScTitle(String scTitle) {
        this.scTitle = scTitle;
    }

    public String getScContent() {
        return scContent;
    }

    public void setScContent(String scContent) {
        this.scContent = scContent;
    }

    public LocalDateTime getSubDateTime() {
        return subDateTime;
    }

    public void setSubDateTime(LocalDateTime subDateTime) {
        this.subDateTime = subDateTime;
    }

    public UserBean getUserBean() {
        return userBean;
    }

    public void setUserBean(UserBean userBean) {
        this.userBean = userBean;
    }

    public MainContentBean getMainContentBean() {
        return mainContentBean;
    }

    public void setMainContentBean(MainContentBean mainContentBean) {
        this.mainContentBean = mainContentBean;
    }

    @Override
    public String toString() {
        return "SubContentBean{" +
                "subContentId=" + subContentId +
                ", scTitle='" + scTitle + '\'' +
                ", scContent='" + scContent + '\'' +
                ", localDateTime=" + subDateTime +
                ", userBean=" + userBean +
                ", mainContentBean=" + mainContentBean +
                '}' + "\n";
    }
}
